/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.insta.VisitorPattern;

/**
 *
 * @author Sebastien
 */
public class LowerCaseVisitor implements IVisitor
{

    @Override
    public void Visit(IVisitable visitable)
    {
        // On re-caste l'objet IVisitable vers son type originel..
        Person target = (Person)visitable;

        // et on demande au visiteur de faire son travail..
        target.setName(target.getName().toLowerCase());
    
    }
    
}
